
{% extends "framework.html" %}
{% block main %}
<input id="json_url" type="text" style="width:600px">
<input type="button" value="查看"
onclick="load_json(document.getElementById('json_url').value);">
<script type="text/javascript">
    function load_json(url){
        var script = document.createElement('script');
        script.setAttribute('type', 'text/javascript');
        script.setAttribute('src', url);
        script.onload = script.onreadystatechange = function() {
            if (!this.readyState || this.readyState == "loaded" || this.readyState == "complete") {
                head.removeChild(script);                
            }
        }
        var head = document.getElementsByTagName('head')[0];
        head.appendChild(script);
    };
    function picasaweb(obj){
        for(var i=0;i<obj.feed.entry.length;i++){
            //$('log').innerHTML+=obj;
           console.debug(obj.feed.entry[i].media$group.media$content[0].url); 
        }
        //console.debug(obj);
    };
    load_json('http://picasaweb.google.com/data/feed/base/user/wwwppp0801/albumid/5228443229688817169?alt=json&hl=en_US&callback=picasaweb');
</script>
<div id="log"></div>
<!--
http://picasaweb.google.com/data/entry/base/user/wwwppp0801/albumid/5228063478153786337?alt=json&hl=en_US
<script type="text/javascript"
src='http://picasaweb.google.com/data/feed/base/user/wwwppp0801?category=album&alt=json&callback=picasaweb&access=public'>
</script>
-->
{% endblock %}
